USE Liberty
GO

-- ------------------------------------------------------------------------------------------------
-- TypesOfActivity Table Create Script
-- ------------------------------------------------------------------------------------------------
SET NOCOUNT OFF
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
GO

PRINT 'Creating TypesOfActivity table...'
GO

IF OBJECT_ID( 'TypesOfActivity' ) IS NULL
BEGIN
    CREATE TABLE DBO.TypesOfActivity
	(OID				bigint		IDENTITY(1, 1)	NOT NULL
	,Version			rowversion
	,Description		varchar(64)					NOT NULL
	,Active				tinyint						NOT NULL 
		CONSTRAINT DFLT_TypesOfActivity_Active DEFAULT (1)
	,DisplayOrder		smallint					NOT NULL 
	    CONSTRAINT DFLT_TypesOfActivity_DisplayOrder DEFAULT (1)
	,CreatedDate		datetime					NOT NULL
		CONSTRAINT DFLT_TypesOfActivity_CreatedDate DEFAULT GETDATE()

	,CONSTRAINT PK_TypesOfActivity PRIMARY KEY CLUSTERED( OID ) --ON PRIMARY

	) 

	PRINT 'Table dbo.TypesOfActivity has been created'

END
ELSE
BEGIN
	PRINT 'Table dbo.TypesOfActivity already exists'
END
GO
